print('递归测试')


def jc(x):
    if x == 1:
        return 1
    else:
        return x * jc(x - 1)

# print(jc(5))


def fb(n):
    if n < 0:
        return -1
    if n == 1 or n == 2:
        return 1
    else:
        return fb(n-1) + fb(n-2)

# print(fb(20))

# 汉诺塔
def hanoi(n,x,y,z):
    if n == 1:
        print(x ,'---->' , z)
    else:
        hanoi(n-1,x,z,y)
        print(x , '---->' ,z)
        hanoi(n-1,y,x,z)



print(hanoi(3,'x','y','z'))